package io.xccit.menu;

import io.xccit.type.Sports;
import io.xccit.type.Welfare;

import java.util.Scanner;

/**
 * @author CH_ywx
 * @version 1.0
 * @create 2024/4/9
 * <p>二级菜单</p>
 */
public class SecondMenu {
    /**
     * 福彩菜单
     */
    public void startWelfare() {
        Scanner scanner = new Scanner(System.in);
        Welfare welfare = new Welfare();
        System.out.println("1.双色球 2.快乐8 3.3D 4.七乐彩");
        System.out.print("Please enter your choice: ");
        int choice = scanner.nextInt();
        switch (choice) {
            case 1:
                welfare.getUnionLotto();
                break;
            case 2:
                welfare.happyEight();
                break;
            case 3:
                welfare.luck3D();
                break;
            case 4:
                welfare.sevenHappy();
                break;
        }
    }

    /**
     * 体彩菜单
     */
    public void startSports() {
        Scanner scanner = new Scanner(System.in);
        System.out.println("1.大乐透 2.排列3 3.排列5 4.七星彩");
        Sports sports = new Sports();
        System.out.print("Please enter your choice: ");
        int choice = scanner.nextInt();
        switch (choice) {
            case 1:
                sports.bigLottery();
                break;
            case 2:
                sports.arrangement3();
                break;
            case 3:
                sports.arrangement5();
                break;
            case 4:
                sports.sevenStar();
                break;
        }
    }

    /**
     * 是否继续
     *
     * @return
     */
    public boolean isContinue() {
        Scanner scanner = new Scanner(System.in);
        char select = scanner.next().charAt(0);
        System.out.print("Continue? (y/n)");
        if (select == 'y' || select == 'Y') {
            return true;
        }
        return false;
    }
}
